package com.tchy.cloud.entity;

import javax.persistence.*;
import java.math.BigDecimal;
import java.sql.Time;
import java.util.Date;

import static javax.persistence.GenerationType.IDENTITY;

/**
 * Created by xiaoji on 2017/2/20.
 */
@Entity
@Table(name = "a_order", schema = "", catalog = "")
public class AOrderEntity {
    private Long orderId;
    private String reservationNumber;
    private Integer orderType;
    private Date orderTime;
    private Long timeId;
    private Date payTime;
    private Integer bookLength;
    private Integer usedLength;
//    private Long customerId;
    private ACustomerEntity customerEntity;
//    private Long counselorId;
    private AConsultantEntity consultantEntity;
    private String counselorName;
    private BigDecimal orderPrice;
    private BigDecimal payPrice;
    private Integer orderNum;
    private String customerName;
    private Byte customerSex;
    private Integer customerAge;
    private String customerHeader;
    private String problemDesc;
    private Integer orderStatus;
    private Integer payType;
    private Integer payStatus;
    private Date commentTime;
    private Byte isComment;
    private String counselorContact;
    private String customerContact;
    private String counselorAccid;
    private String customerAccid;
    private String counselorAddr;
    private BigDecimal counselorLng;
    private BigDecimal counselorLat;
    private Long couponId;
    private Integer cancelType;
    private Date sureTime;
    private Date cancelTime;
    private Date finishTime;
    private Integer twTotal;
    private Integer twUsed;
    private String businessOrder;
    private String playOrder;
    private String refundReason;
    private Date invalidTime;
    private Integer remind;

    @Id
    @GeneratedValue(strategy = IDENTITY)
    @Column(name = "order_id")
    public Long getOrderId() {
        return orderId;
    }

    public void setOrderId(Long orderId) {
        this.orderId = orderId;
    }

    @Basic
    @Column(name = "reservation_number")
    public String getReservationNumber() {
        return reservationNumber;
    }

    public void setReservationNumber(String reservationNumber) {
        this.reservationNumber = reservationNumber;
    }

    @Basic
    @Column(name = "order_type")
    public Integer getOrderType() {
        return orderType;
    }

    public void setOrderType(Integer orderType) {
        this.orderType = orderType;
    }

    @Basic
    @Column(name = "order_time")
    public Date getOrderTime() {
        return orderTime;
    }

    public void setOrderTime(Date orderTime) {
        this.orderTime = orderTime;
    }

    @Basic
    @Column(name = "time_id")
    public Long getTimeId() {
        return timeId;
    }

    public void setTimeId(Long timeId) {
        this.timeId = timeId;
    }

    @Basic
    @Column(name = "pay_time")
    public Date getPayTime() {
        return payTime;
    }

    public void setPayTime(Date payTime) {
        this.payTime = payTime;
    }


    @Basic
    @Column(name = "book_length")
    public Integer getBookLength() {
        return bookLength;
    }

    public void setBookLength(Integer bookLength) {
        this.bookLength = bookLength;
    }

    @Basic
    @Column(name = "used_length")
    public Integer getUsedLength() {
        return usedLength;
    }

    public void setUsedLength(Integer usedLength) {
        this.usedLength = usedLength;
    }

//    @Basic
//    @Column(name = "customer_id")
//    public Long getCustomerId() {
//        return customerId;
//    }
//
//    public void setCustomerId(Long customerId) {
//        this.customerId = customerId;
//    }
//
//    @Basic
//    @Column(name = "counselor_id")
//    public Long getCounselorId() {
//        return counselorId;
//    }
//
//    public void setCounselorId(Long counselorId) {
//        this.counselorId = counselorId;
//    }

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "customer_id")
    public ACustomerEntity getCustomerEntity() {
        return customerEntity;
    }

    public void setCustomerEntity(ACustomerEntity customerEntity) {
        this.customerEntity = customerEntity;
    }

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "counselor_id")
    public AConsultantEntity getConsultantEntity() {
        return consultantEntity;
    }

    public void setConsultantEntity(AConsultantEntity consultantEntity) {
        this.consultantEntity = consultantEntity;
    }

    @Basic
    @Column(name = "counselor_name")
    public String getCounselorName() {
        return counselorName;
    }

    public void setCounselorName(String counselorName) {
        this.counselorName = counselorName;
    }

    @Basic
    @Column(name = "order_price")
    public BigDecimal getOrderPrice() {
        return orderPrice;
    }

    public void setOrderPrice(BigDecimal orderPrice) {
        this.orderPrice = orderPrice;
    }

    @Basic
    @Column(name = "pay_price")
    public BigDecimal getPayPrice() {
        return payPrice;
    }

    public void setPayPrice(BigDecimal payPrice) {
        this.payPrice = payPrice;
    }

    @Basic
    @Column(name = "order_num")
    public Integer getOrderNum() {
        return orderNum;
    }

    public void setOrderNum(Integer orderNum) {
        this.orderNum = orderNum;
    }

    @Basic
    @Column(name = "customer_name")
    public String getCustomerName() {
        return customerName;
    }

    public void setCustomerName(String customerName) {
        this.customerName = customerName;
    }

    @Basic
    @Column(name = "customer_sex")
    public Byte getCustomerSex() {
        return customerSex;
    }

    public void setCustomerSex(Byte customerSex) {
        this.customerSex = customerSex;
    }

    @Basic
    @Column(name = "customer_age")
    public Integer getCustomerAge() {
        return customerAge;
    }

    public void setCustomerAge(Integer customerAge) {
        this.customerAge = customerAge;
    }

    @Basic
    @Column(name = "customer_header")
    public String getCustomerHeader() {
        return customerHeader;
    }

    public void setCustomerHeader(String customerHeader) {
        this.customerHeader = customerHeader;
    }

    @Basic
    @Column(name = "problem_desc")
    public String getProblemDesc() {
        return problemDesc;
    }

    public void setProblemDesc(String problemDesc) {
        this.problemDesc = problemDesc;
    }

    @Basic
    @Column(name = "order_status")
    public Integer getOrderStatus() {
        return orderStatus;
    }

    public void setOrderStatus(Integer orderStatus) {
        this.orderStatus = orderStatus;
    }

    @Basic
    @Column(name = "pay_type")
    public Integer getPayType() {
        return payType;
    }

    public void setPayType(Integer payType) {
        this.payType = payType;
    }

    @Basic
    @Column(name = "pay_status")
    public Integer getPayStatus() {
        return payStatus;
    }

    public void setPayStatus(Integer payStatus) {
        this.payStatus = payStatus;
    }

    @Basic
    @Column(name = "comment_time")
    public Date getCommentTime() {
        return commentTime;
    }

    public void setCommentTime(Date commentTime) {
        this.commentTime = commentTime;
    }

    @Basic
    @Column(name = "is_comment")
    public Byte getIsComment() {
        return isComment;
    }

    public void setIsComment(Byte isComment) {
        this.isComment = isComment;
    }

    @Basic
    @Column(name = "counselor_contact")
    public String getCounselorContact() {
        return counselorContact;
    }

    public void setCounselorContact(String counselorContact) {
        this.counselorContact = counselorContact;
    }

    @Basic
    @Column(name = "customer_contact")
    public String getCustomerContact() {
        return customerContact;
    }

    public void setCustomerContact(String customerContact) {
        this.customerContact = customerContact;
    }

    @Basic
    @Column(name = "counselor_accid")
    public String getCounselorAccid() {
        return counselorAccid;
    }

    public void setCounselorAccid(String counselorAccid) {
        this.counselorAccid = counselorAccid;
    }

    @Basic
    @Column(name = "customer_accid")
    public String getCustomerAccid() {
        return customerAccid;
    }

    public void setCustomerAccid(String customerAccid) {
        this.customerAccid = customerAccid;
    }

    @Basic
    @Column(name = "counselor_addr")
    public String getCounselorAddr() {
        return counselorAddr;
    }

    public void setCounselorAddr(String counselorAddr) {
        this.counselorAddr = counselorAddr;
    }

    @Basic
    @Column(name = "counselor_lng")
    public BigDecimal getCounselorLng() {
        return counselorLng;
    }

    public void setCounselorLng(BigDecimal counselorLng) {
        this.counselorLng = counselorLng;
    }

    @Basic
    @Column(name = "counselor_lat")
    public BigDecimal getCounselorLat() {
        return counselorLat;
    }

    public void setCounselorLat(BigDecimal counselorLat) {
        this.counselorLat = counselorLat;
    }

    @Basic
    @Column(name = "coupon_id")
    public Long getCouponId() {
        return couponId;
    }

    public void setCouponId(Long couponId) {
        this.couponId = couponId;
    }

    @Basic
    @Column(name = "cancel_type")
    public Integer getCancelType() {
        return cancelType;
    }

    public void setCancelType(Integer cancelType) {
        this.cancelType = cancelType;
    }

    @Basic
    @Column(name = "sure_time")
    public Date getSureTime() {
        return sureTime;
    }

    public void setSureTime(Date sureTime) {
        this.sureTime = sureTime;
    }

    @Basic
    @Column(name = "cancel_time")
    public Date getCancelTime() {
        return cancelTime;
    }

    public void setCancelTime(Date cancelTime) {
        this.cancelTime = cancelTime;
    }

    @Basic
    @Column(name = "finish_time")
    public Date getFinishTime() {
        return finishTime;
    }

    public void setFinishTime(Date finishTime) {
        this.finishTime = finishTime;
    }

    @Basic
    @Column(name = "tw_total")
    public Integer getTwTotal() {
        return twTotal;
    }

    public void setTwTotal(Integer twTotal) {
        this.twTotal = twTotal;
    }

    @Basic
    @Column(name = "tw_used")
    public Integer getTwUsed() {
        return twUsed;
    }

    public void setTwUsed(Integer twUsed) {
        this.twUsed = twUsed;
    }

    @Basic
    @Column(name = "business_order")
    public String getBusinessOrder() {
        return businessOrder;
    }

    public void setBusinessOrder(String businessOrder) {
        this.businessOrder = businessOrder;
    }

    @Basic
    @Column(name = "play_order")
    public String getPlayOrder() {
        return playOrder;
    }

    public void setPlayOrder(String playOrder) {
        this.playOrder = playOrder;
    }

    @Basic
    @Column(name = "refund_reason")
    public String getRefundReason() {
        return refundReason;
    }

    public void setRefundReason(String refundReason) {
        this.refundReason = refundReason;
    }

    @Basic
    @Column(name = "invalid_time")
    public Date getInvalidTime() {
        return invalidTime;
    }

    public void setInvalidTime(Date invalidTime) {
        this.invalidTime = invalidTime;
    }

    @Basic
    @Column(name = "remind")
    public Integer getRemind() {
        return remind;
    }

    public void setRemind(Integer remind) {
        this.remind = remind;
    }
}
